var template_= `
<div v-for="(item, index) in sourceData" :key="index" >
    <el-submenu :key="item.id" :index="item.path" v-if="item.children" >
        <template slot="title">
            <i :class="item.icon"></i>
            <span slot="title"> {{ item.meta }}</span>
        </template>                        
                        
        <el-menu-item :index="cItem.path" v-for="(cItem, cIndex) in item.children" 
            :key="cItem.id" @click="saveRoutePath(cItem.path)">
            <i :class="cItem.icon"></i>
            <span slot="title">{{ cItem.meta }}</span>
        </el-menu-item>
    </el-submenu>

    <el-menu-item :index="item.path" v-else 
        :key="item.id" @click="saveRoutePath(item.path)">
        <i :class="item.icon"></i>
        <span slot="title"> {{ item.meta }}</span>
    </el-menu-item>
</div>`

// 需要这种方式导入(table.js) pagination : () => import('../components/pagination.js')
export default {
   // name:'menutree_',
    props: {
        sourceData: {
            type: Array,
            required: true
        }       
    }, 
    template:template_,
};

